function W_add = new_weight1(add,W)
m = length(add);
W_add = zeros(m,2);
for v = 1:length(add)
n = 1;                                
p1 = add(v);
p2 = p1+1;
if p2>length(W)
    p2 = p1-1;
end
        w = randi([0,1]);
        r = w*(0.5^n*W(p1,:)+(1-0.5^n)*W(p2,:)) + (1-w)*((1-0.5^n)*W(p1,:)+0.5^n*W(p2,:));
        W_add(v,:) = r;
end
end

